package com.uetoken.cn.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.uetoken.cn.R;
import com.uetoken.cn.bean.FeedBackListBean;

import java.util.List;

/**
 * @author 谢杨
 * @time 2018/9/12 11:40
 * @class 描述:
 */
public class FeedBackListAdapter extends BaseQuickAdapter<FeedBackListBean.DataBean,BaseViewHolder> {
    public FeedBackListAdapter(int layoutResId, @Nullable List<FeedBackListBean.DataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, FeedBackListBean.DataBean item) {
        helper.setText(R.id.tv_item_feed_back_list_title,item.getTitle());
        helper.setText(R.id.tv_item_feed_back_list_content,item.getMessage());
        if (item.getStatus()==0){
            helper.setText(R.id.tv_item_feed_back_list_handle_status,mContext.getResources().getString(R.string.str_feed_back_unprocessed));
        }else{
            helper.setText(R.id.tv_item_feed_back_list_handle_status,mContext.getResources().getString(R.string.str_feed_back_processed));
        }
    }
}
